#include <stdio.h>
#include <string.h>
#include "netfn_0x06_cmd_0x01.h"
#include "ipmi.h"
#include "ipmi_netfn.h"

uint16 GetDeviceID(uint8* request_data, uint16 request_data_size, uint8* response_data)
{
    GetDeviceIDReq* req = (GetDeviceIDReq*)request_data;
    GetDeviceIDRes* res = (GetDeviceIDRes*)response_data;
    res->CompletionCode = CC_NORMALLY;
    uint16 response_data_size = sizeof(GetDeviceIDRes);

    res->DeviceID = 0x00;
    res->DeviceRevision = 0x00;
    res->FirmwareRevision1 = 0x00;
    res->FirmwareRevision2 = 0x01;
    res->IPMIVersion = 0x51;
    res->AdditionalDeviceSupport = 0;
    res->ManufacturerID[0] = 0x00;
    res->ManufacturerID[1] = 0x01;
    res->ManufacturerID[2] = 0x02;
    res->ProductID = 0;
    res->AuxiliaryFirmwareRevisionInformation = 0;
    return response_data_size;
}

void init_command(cmd_assigments_t* cmd_assigments)
{
    cmd_assigments->privilege = 0x02;
    cmd_assigments->channel = 0x01;
    cmd_assigments->command_entrance = &GetDeviceID;
}   

